package com.thiswhyme.common.utils;

/**
 * @description: 分页工具类
 * @author: thiswhyme
 * @date: 2020/9/29
 */
public class PageUtils {

    /**
     * 获取起始记录
     * @param current
     * @param pageSize
     * @return
     */
    public static int getStart(int current, int pageSize) {
        current = current <= 0 ? 1 : current;
        pageSize = pageSize <= 0 ? 15 : pageSize;
        return (current - 1) * pageSize;
    }
}
